package test;

public class B {
    private int a;  //类内权限
    int b;          //包内权限
    protected int c;//父子权限、包内权限
    public int d;   //全局权限

    public void func1() {
        this.a=10;
        this.b=11;
        this.c=12;
        this.d=13;
    }
}

class Test {
    public static void main(String[] args) {
        B test1=new B();
        //test1.a=10;//报错，只能在类内访问
        test1.b=11;
        test1.c=12;
        test1.d=13;
    }
}

class Test2 extends B {
    public void func2() {
        //super.a=11;//报错，只能在类内访问
        super.b=12;
        super.c=13;
        super.d=14;
    }
}

class Test3 extends B {
    public void func3() {
        //super.a=10;
        //super.b=12;
        super.c=13;
        super.d=14;
    }
}

class Test4 extends B {
    public void func4() {
        //super.a=10;
        //super.b=12;
        //super.c=13;
        super.d=14;
    }
}

//class Father {
//    public Father() {
//        System.out.println("ConstructorFather()");
//    }
//}
//
//class Child extends Father {
//    public Child() {
//        super();
//        System.out.println("ConstructorChild()");
//    }
//}
//
//
//
//
//public class Test {
//
//}